﻿using UnityEngine;
using System.IO;
using System.Collections;
using System.Collections.Generic;

public class LuaUI : MonoBehaviour {

	public static string luaUIRootPath = "GameResources/UI/Lua";
	public string luaFile;
	
	public List<LuaUIEventMethod> methods = new List<LuaUIEventMethod>();
	
	void CheckEvent(LuaUIEventMethod method)
	{
		return;
	}
	
	void OnClick()
	{
		CheckEvent(LuaUIEventMethod.OnClick);
	}
	
	void OnDoubleClick()
	{
		CheckEvent(LuaUIEventMethod.OnDoubleClick);
	}
	
	void OnHover(bool isOver)
	{
		if(isOver)
			CheckEvent(LuaUIEventMethod.OnOver);
		else
			CheckEvent(LuaUIEventMethod.OnExit);
	}
	
	void OnPress(bool isPressed)
	{
		if(isPressed)
			CheckEvent(LuaUIEventMethod.OnPress);
		else
			CheckEvent(LuaUIEventMethod.OnUp);
	}
	
	void OnScroll(float delta)
	{
		CheckEvent(LuaUIEventMethod.OnScroll);
	}
	
	void OnDrag(Vector2 delta)
	{
		CheckEvent(LuaUIEventMethod.OnDrag);
	}
	
	void OnDrag(GameObject go)
	{
		CheckEvent(LuaUIEventMethod.OnDrop);
	}
	
	void OnInput(string text)
	{
		CheckEvent(LuaUIEventMethod.OnInput);
	}
}
